{% extends 'promos/base.html' %}

{% block title %}Submit a Promo{% endblock %}

{% block jquery %}
    {{ block.super }}
    $("#id_relevance_begins").datepicker({'altField':'input#id_relevance_begins'})
    $("#id_relevance_ends").datepicker({'altField':'input#id_relevance_ends'})
{% endblock %}

{# wipe menu on edit screens #}
{% block menu %}{% endblock %}

{% block main_content %}
{% if form.instance %}
<h1>Add Promo</h1>
{% else %}
<h1>Submit a Promo</h1>
{% endif %}

{% if form.has_errors %}
<p class="errors">Please correct the following error{{ form.error_dict|pluralize }}:</p>
{% endif %}

<p>Complete this form to promote a story or project on News21.com.  Your work is saved so an editor can sift through entries and promote them on the site.</p>

<form action="" method="post">
<table>
{{ form }}
</table>
<input type="submit" name="submit" value="Save" />
<a href="{% url promos_promo_list %}">Cancel</a>
</form>
{% endblock %}
